"""
URL configuration for demoPython project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path
from tanxi.client.views import chat_views
from tanxi.client.views import articles_views
from tanxi.client.views import user_views
from tanxi.client.views import main_views
from tanxi.client.views import travels_views
from tanxi.client.views import AIProjects_views
# 接口
urlpatterns = [
    path('', main_views.home, name='home'),
    path('api/articles/<int:article_id>', main_views.article_detail, name='article_detail'),  # 文章详情
    path("admin/", admin.site.urls),
    path('api/python/chat', chat_views.chat, name='chat'),
    path('api/python/vision', chat_views.vision, name='vision'),
    path('api/python/get_articles', articles_views.get_articles, name='get_articles'),
    path('api/python/write_articles', articles_views.write_articles, name='write_articles'),
    path('api/python/delete_articles', articles_views.delete_articles, name='delete_articles'),
    path('api/python/user_login', user_views.user_login, name='user_login'),
    path('api/python/user_info', user_views.user_info, name='user_info'),
    path('api/python/user_update', user_views.user_update, name='user_update'),
    path('api/python/user_delete', user_views.user_delete, name='user_delete'),

        # 旅游博客相关路由
    path('api/python/get_travel_blogs', travels_views.get_travel_blogs, name='get_travel_blogs'),
    # 更新及写入
    path('api/python/write_travel_blog', travels_views.write_travel_blog, name='write_travel_blog'),
    path('api/python/delete_travel_blog', travels_views.delete_travel_blog, name='delete_travel_blog'),
 
    # AI项目相关路由
    path('api/python/get_ai_projects', AIProjects_views.get_ai_projects, name='get_ai_projects'),
    # 更新及写入
    path('api/python/write_ai_project', AIProjects_views.write_ai_project, name='write_ai_project'),
    path('api/python/delete_ai_project', AIProjects_views.delete_ai_project, name='delete_ai_project'),
    

    # # 新增批量操作路由
    # path('api/python/batch_get_travel_blogs', travels_views.batch_get_travel_blogs, name='batch_get_travel_blogs'),
    # path('api/python/batch_get_ai_projects', AIProjects_views.batch_get_ai_projects, name='batch_get_ai_projects'),
    
    # # 新增统计路由
    # path('api/python/travel_stats', travels_views.travel_stats, name='travel_stats'),
    # path('api/python/ai_project_stats', AIProjects_views.ai_project_stats, name='ai_project_stats'),
]

# E:\python\python-django\demoPython\tanxi\urls.py

